Imports System.Data.SqlClient
Public Class Telefonos

'Editado por Tito desde Google
    Public Function ObtenerTipDeTel(ByVal NomTDT As String) As DataSet
        Dim DS As New DataSet
        DS = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, _
        "TiposDeTelefonosObtener", New SqlParameter("@NomTDT", NomTDT))
        Return DS
    End Function

    Public Function GenerarTipDeTel(ByVal NomTDT As String) As DataSet
        Dim DS As New DataSet
        DS = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, _
        "TipoDeTelefonoGenerar", New SqlParameter("@NomTDT", NomTDT))
        Return DS
    End Function

    Public Function GenerarTelefono(ByVal CodRS As Integer, ByVal CodTipTel As Integer, _
    ByVal Num As String, Optional ByVal Obs As String = "", Optional ByVal CodDP As Integer = 0)
        Dim DS As New DataSet

        DS = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, _
        "TelefonoGenerar", New SqlParameter("@CodDP", CodDP), New SqlParameter("@CodRS", CodRS), _
        New SqlParameter("@CodTipTel", CodTipTel), New SqlParameter("@NumTel", Num), _
        New SqlParameter("@ObsTel", Obs))
        Return DS
    End Function

    Public Function EliminarTipDeTel(ByVal NomTDT As String) As DataSet
        Dim DS As New DataSet
        DS = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(My.Settings.MiCadena, CommandType.StoredProcedure, _
        "TiposDeTelefonosEliminar", New SqlParameter("@NomTDT", NomTDT))
        Return DS
    End Function
End Class